package artifacts;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.JScrollPane;
import javax.swing.table.DefaultTableModel;
import javax.swing.JButton;
import javax.swing.JTextField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;


public class infoDocumentos extends JDialog {

	private JPanel contentPane;
	private JTable table;
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					infoDocumentos frame = new infoDocumentos();
					frame.setVisible(true);
					
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public infoDocumentos() {
		setTitle("Document information");
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 450, 329);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblName = new JLabel("Name:");
		lblName.setBounds(10, 22, 46, 14);
		contentPane.add(lblName);
		
		JLabel lblCreatedBy = new JLabel("Created by:");
		lblCreatedBy.setBounds(10, 47, 67, 14);
		contentPane.add(lblCreatedBy);
		
		JLabel lblAccessedBy = new JLabel("Last access:");
		lblAccessedBy.setBounds(10, 72, 100, 14);
		contentPane.add(lblAccessedBy);
		
		JLabel lblLastModification = new JLabel("Last Modification:");
		lblLastModification.setBounds(10, 97, 100, 14);
		contentPane.add(lblLastModification);
		
		JLabel lblFinalVersion = new JLabel("Final version:");
		lblFinalVersion.setBounds(10, 122, 83, 14);
		contentPane.add(lblFinalVersion);
		
		JLabel lblVersions = new JLabel("Versions:");
		lblVersions.setBounds(10, 147, 83, 14);
		contentPane.add(lblVersions);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(10, 172, 414, 79);
		contentPane.add(scrollPane);
		
		table = new JTable();
		table.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
			},
			new String[] {
				"Version", "Date", "User", "Annotated words"
			}
		));
		scrollPane.setViewportView(table);
		
		JButton btnClose = new JButton("Close");
		btnClose.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				infoDocumentos.this.dispose();
			}
		});
		btnClose.setBounds(172, 257, 89, 23);
		contentPane.add(btnClose);
		
		textField = new JTextField();
		textField.setBounds(130, 22, 160, 20);
		contentPane.add(textField);
		textField.setColumns(10);
		
		textField_1 = new JTextField();
		textField_1.setColumns(10);
		textField_1.setBounds(130, 47, 160, 20);
		contentPane.add(textField_1);
		
		textField_2 = new JTextField();
		textField_2.setColumns(10);
		textField_2.setBounds(130, 72, 160, 20);
		contentPane.add(textField_2);
		
		textField_3 = new JTextField();
		textField_3.setColumns(10);
		textField_3.setBounds(130, 97, 160, 20);
		contentPane.add(textField_3);
		
		textField_4 = new JTextField();
		textField_4.setColumns(10);
		textField_4.setBounds(130, 122, 160, 20);
		contentPane.add(textField_4);
	}

}
